<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<jsp:include page="/WEB-INF/backstage/util.jsp" />
</head>
<body>
	<center>
		<form style="font-weight: bold;font-size: 15px" action="${pageContext.request.contextPath }/wsyactive/selectBis_coupon_record"  class="form-inline" method="post">
			<input type="hidden" name="active_id" value="${active_id }">
			  <div class="form-group">
			     兑换码：<input type="text" id="cdkey" name="cdkey">
			  </div>
			  <div class="form-group">
			    兑换手机：<input  type="text" id="mobile" name="mobile">
			  </div>
			  <div class="checkbox">
			    状态：<select class="form-control" name="status" id="status">
				  <option value="-1">--未选择--</option>
				  	<option value="1">未兑换</option>
				  	<option value="2">已兑换</option>
				  	<option value="3">已失效</option>
				 </select>
			  </div>
			  <div class="form-group">
			     <button style="font-weight: bold;font-size: 15px" type="button" class="glyphicon glyphicon-search" onclick="zhcx()">查询</button>
			  </div>
			  <div class="form-group">
			    <button style="font-weight: bold;font-size: 15px" type="button" class="glyphicon glyphicon-refresh" onclick="chongzhi()">重置</button></div>
			  </div>
			  <div class="form-group">
			    <button style="font-weight: bold;font-size: 15px" type="button" class="glyphicon glyphicon-refresh" onclick="fanhui()">返回</button></div>
			  </div>
		      <table class="table table-hover" border="1">
					<tr>
						<td></td>
						<td>兑换码</td>
						<td>兑换手机</td>
						<td>状态</td>
						<td>兑换时间</td>
						<td>创建时间</td>
						
					</tr>
					<c:forEach items="${recordList }" var="r">
						<tr>
							<td>${r.record_id }</td>
							<td>${r.cdkey }</td>
							<td>${r.mobile }</td>
							<td>${r.status=='1'?'未兑换':r.status=='2'?'已兑换':r.status=='3'?'已失效':'未知' }</td>
							<td><f:formatDate value="${r.exchange_time }" pattern="yyyy-MM-dd hh:mm:ss"/></td>
							<td><f:formatDate value="${r.create_time }" pattern="yyyy-MM-dd hh:mm:ss"/></td>
						</tr>
					</c:forEach>
				</table>
			</form>
	</center>
</body>
<script type="text/javascript">
function zhcx(){
	form.action="${pageContext.request.contextPath }/wsyactive/selectBis_coupon_record";
	form.submit();
}
function chongzhi(){
	$("#cdkey").val(null);
	$("#mobile").val(null);
	$("#status").val("-1");
}
function fanhui(){
	window.location.href='${pageContext.request.contextPath }/wsyactive/selectBis_coupon_active';
}
</script>
</html>
